#include <stdio.h>
#include <stdlib.h>
int main()
{
	FILE *fp;
	int i,a[5];
	printf("Input 5 numbers:");
	for(i=0;i<5;i++)
		scanf("%d",&a[i]);
	if((fp=fopen("file2.dat","wb"))==NULL)
	{
		printf("Can not open file");
		exit(0);
	}
	fwrite(a,sizeof(int),5,fp);
	fclose(fp);
	return 0;
}